package hongjiang.info
//http://hongjiang.info/scala210-eval-script/
object EvalScript extends App{
  import scala.tools.reflect.ToolBox
  val tb = scala.reflect.runtime.currentMirror.mkToolBox()
  val tree = tb.parse("1 to 3 map (_+1)")
  println(tree)
  val result = tb.eval(tree)
  println(result)
}